"""
Contains the class that create pkLibraryElement
objects from the database information

/file pkElementCreator.py
/author Guillaume
/date December 5th, 2012
"""

from pkDatabase import LIBRARY_ELEMENT, pkDatabase
from pkSong import pkSong

class pkElementCreator():
	""" Creator of LibraryElement from Database """

	def __init__(self):
		self.db = pkDatabase()

	def create_song(self, db_id):
		"""
		Create a Song object with the information found in the Database
		"""

		song_info = self.db.select_element("song", db_id)
		song_object = pkSong(song_info, db_id)
		return song_object



class testElementCreator(unittest.TestCase):

	def test_create_song(self):
		song_path = "../testSongs/test.mp3"



if __name__ == "__name__":
	unittest.main()
